<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>新闻动态</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> -->
    <link rel="stylesheet" type="text/css" href="${ctxPath}/static/css/style.css">
    <script type="text/javascript" src="${ctxPath}/static/js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="${ctxPath}/static/js/project.js"></script>
</head>
<body>
<form action="" method="post" id="form" name="form">
	<input type="hidden" id="pageNum" name="pageNum">
</form>
<input type="hidden" id="fnmod" value="news_center">
<div class="header_bg">
    <div class="header">
        <div class="logo"><a href="${ctxPath}/webHome/index"><img src="${ctxPath}/static/images/index/logo.jpg" alt=""></a></div>
        <div class="title">
            <ul>
                <li><a href="${ctxPath}/webHome/index">首页</a></li>
                <li><a href="${ctxPath}/webProduct/nidex">产品中心</a>
                    <div class="product_list" >
                        <ul>
                            <li><a href="${ctxPath}/webProduct/index">所有产品</a></li>
                            <!--# for(var type in productType){ -->
			                    <li><a href="${ctxPath}/webProduct/index?typeId=${type.id!}&typeName=${type.type_name!}">${type.type_name!}</a></li>
		                    <!--# } -->
                        </ul>
                    </div>
                </li>
                <li><a href="${ctxPath}/webNews/nidex">新闻动态</a></li>
                <li><a href="${ctxPath}/webAbout/index">关于我们</a></li>
                <li><a href="${ctxPath}/webContact/index">联系我们</a></li>
            </ul>
        </div>
        <div style="clear: both;"></div>
    </div>
</div>
<div style="clear: both;"></div>
<div class="main">
<div class="new-title"><p>文章列表</p></div>
    <div class="news-center-wrap">
        <div class="new-list">
        <ul>
        	<!--# for(var news in newsList){ -->
	            <li>
	                <div class="date">
	                    <i>${news.days!}</i>
	                    <span>${news.time!}</span>
	                </div>
	                <div class="news-content">
	                    <div class="news-content-title"><a href="${ctxPath}/webNews/newsDetail?id=${news.id!}" target="_blank"><b>${news.title!}</b></a></div>
	                    <p >
	                    	<a href="${ctxPath}/webNews/newsDetail?id=${news.id!}" target="_blank">
	                    		${news.content!}...
	                    	</a>
	                    </p>
	                </div>
	            </li>
            <!--# } -->
        </ul>
    </div>
    <div style="clear: both;"></div>
    <div class="page">
        <a class="last" onclick="paging('sub')">上一页</a>
        <!--# for(var i=0; i<totalPage.Ncount!; i++){ -->
        	<!--# if(totalPage.Ncount! == 1){ -->
        		<a class="on" >${i+1}</a>
        	<!--# }else{ -->
        		<a class="on" onclick="paging('${i+1}')">${i+1}</a>
        	<!--# } -->
        <!--# } -->
        <a class="last next" onclick="paging('add')">下一页</a>
    </div>
</div>
    
</div>
<div style="clear: both;"></div>
<!--<div class="top"></div>-->
<div class="footer">
    版权信息
</div>

<script type="text/javascript">
	function paging(type){
		var pageNum = '${pageNum!}';
		var totalPage = '${totalPage.Ncount!}';
		console.log(pageNum);
		if(type == 'add'){
			if(Number(pageNum) >= totalPage){
				return;
			}else{
				pageNum = Number(pageNum)+1;
			}
		}else if(type == 'sub'){
			if(pageNum == '1'){
				return
			}else{
				pageNum = Number(pageNum)-1;
			}
		}else{
			pageNum = type;
		}
		$("#pageNum").val(pageNum);
		$("#form").submit();
	}
	
</script>

</body>
</html>